<template>
  <div class="recommend">
    <div v-for="item in recommends" class="recommend-item">
      <a :href="item.link">
        <img :src="item.image" alt="">
        <div>{{ item.title }}</div>
      </a>
    </div>
  </div>
</template>

<script>
export default {
  name: "HomeRecommendView",
  props: {
    recommends: {
      type: Array,
      default() {
        return [];
      }
    }

  }
}
</script>

<style scoped>
.recommend {
  display: flex;
  text-align: center;
  font-size: 12px;
  padding: 15px 0 30px;

  border-bottom: 8px solid #eee;        /*设置元素下边框的样式。solids是定义为实线*/
}

.recommend-item {
  flex: 1;
}
.recommend-item img {
  width: 90%;
  height: 90%;
}
</style>